﻿using System;

// ReSharper disable once CheckNamespace
namespace com.nm.ApiServer.Attributes {
	/// <summary>
	/// 配置缓存
	/// </summary>
	[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method)]
	public class CacheAttribute :Attribute{
		/// <summary>
		/// 超时时间，单位分钟
		/// </summary>
		public int TimeOut { get; set; }

		/// <summary>
		/// 初始化，默认30分钟超时
		/// </summary>
		public CacheAttribute():this(30){
		}
		/// <summary>
		/// 初始化，设定超时时间
		/// </summary>
		/// <param name="timeOut"></param>
		public CacheAttribute(int timeOut){
			this.TimeOut = timeOut;
		}
	}
}
